package oop;

/**
 * @author: knowno
 * @create: 2025-09-11 08:54
 * @Version 1.0
 **/
public class Apple {
    String color;
    int weight;

    /**
     * 无参构造方法
     */
    public Apple() {
    }

    /**
     * 有参构造方法-给对象属性赋值
     * @param color
     * @param weight
     */
    public Apple(String color, int weight) {
        //this代指当前类对象
        this.color = color;
        this.weight = weight;
    }
}
